cmake_minimum_required(VERSION 3.0.2)
project(map_division)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  message_generation
)

find_package(OpenCV REQUIRED)
find_package(nlohmann_json 3.2.0 REQUIRED)

add_service_files(
  FILES
  map_division.srv
)

generate_messages(
  DEPENDENCIES
  std_msgs
)

catkin_package(
 INCLUDE_DIRS include
#  LIBRARIES map_division
 CATKIN_DEPENDS roscpp rospy std_msgs
#  DEPENDS system_lib
)

include_directories(
  include
  ${catkin_INCLUDE_DIRS}
  INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
)

add_executable(mapDivision src/mapDivision.cpp src/OccupancyGridParam.cpp)
target_link_libraries(mapDivision ${catkin_LIBRARIES} ${OpenCV_LIBS} nlohmann_json::nlohmann_json)

add_executable(regionGrow src/regionGrow.cpp)
target_link_libraries(regionGrow ${catkin_LIBRARIES} ${OpenCV_LIBS})


